package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * MonitorType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "MONITOR_TYPE")
public class MonitorType implements java.io.Serializable, Comparable {

    /**
     * 
     */
    private static final long serialVersionUID = -571681814875703484L;

    // Fields
    private Long id;
    private String name;
    private String code;
    private String descript;
    private String picture;
    private Integer seq;

    // Constructors

    /** default constructor */
    public MonitorType() {
    }

    /** minimal constructor */
    public MonitorType(Long id) {
        this.id = id;
    }

    /** full constructor */
    public MonitorType(Long id, String name, String code, String descript, String picture, Integer seq) {
        this.id = id;
        this.name = name;
        this.code = code;
        this.descript = descript;
        this.picture = picture;
        this.seq = seq;
    }

    // Property accessors
    @Id
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "NAME", length = 32)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "CODE", length = 256)
    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Column(name = "DESCRIPT", length = 128)
    public String getDescript() {
        return this.descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    @Column(name = "PICTURE", length = 64)
    public String getPicture() {
        return this.picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    @Column(name = "SEQ", precision = 9, scale = 0)
    public Integer getSeq() {
        return this.seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    @Override
    public String toString() {
        return "MonitorType [id=" + id + ", name=" + name + ", code=" + code + ", descript=" + descript + ", picture=" + picture + ", seq=" + seq + "]";
    }

    @Override
    public int compareTo(Object o) {
        MonitorType another = (MonitorType) o;
        return this.getSeq() - another.getSeq();
    }

}